<?php
/**
 * 入口文件
 *
 * 统一入口，进行初始化信息全局设置
 *
 *
 * @copyright  Copyright (c) 2010-2015 ZoomTK  Inc. (http://www.zoomtk.com)
 * @license    http://www.zoomtk.com/
 * @link       http://www.zoomtk.com/
 * @since      File version v2.0
 */

define('BASE_PATH', substr($_SERVER['SCRIPT_NAME'], 0, -10));
define('BASE_ROOT_PATH', str_replace('\\', '/', dirname(__FILE__)));
define('BASE_DATA_PATH', BASE_ROOT_PATH . '/data');
define("BASE_UPLOAD_PATH", BASE_ROOT_PATH . "/data/upload");
define("BASE_RESOURCE_PATH", BASE_ROOT_PATH . "/data/resource");


//应用常量
define('Language', ROOT_PATH . '/application/common/lang');
define('TIMESTAMP', time());
define('BASE_DATA_PATH', ROOT_PATH.'/public');
define('BASE_UPLOAD_PATH',ROOT_PATH . '/uploads');
define('BASE_RESOURCE_PATH', BASE_DATA_PATH . '/resource');
define('ATTACH_GOODS_CLASS', 'shop/goods_class');

/**
 * 初始化
 */
define('StartTime', microtime(true));
define('TIMESTAMP', time());
define('DIR_SHOP', 'shop');
define('DIR_MBMBER', 'member');
define('DIR_CMS', 'cms');
define('DIR_CIRCLE', 'circle');
define('DIR_MICROSHOP', 'microshop');
define('DIR_ADMIN', 'admin');
define('DIR_API', 'api');
define('DIR_MOBILE', 'moxl_app');
define('DIR_WAP', 'mobile');
define('DIR_RESOURCE', 'data/resource');
define('DIR_CACHE', 'data/cache');
define('DIR_UPLOAD', 'data/upload');
define('ATTACH_PATH', 'shop');
define('ATTACH_COMMON', 'shop/common');
define('ATTACH_AVATAR', 'shop/avatar');
define('ATTACH_EDITOR', 'shop/editor');
define('ATTACH_MEMBERTAG', 'shop/membertag');
define('ATTACH_STORE', 'shop/store');
define('ATTACH_GOODS', 'shop/store/goods');
define('ATTACH_STORE_DECORATION', 'shop/store/decoration');
define('ATTACH_LOGIN', 'shop/login');
define('ATTACH_ARTICLE', 'shop/article');
define('ATTACH_BRAND', 'shop/brand');
define('ATTACH_GOODS_CLASS', 'shop/goods_class');
define('ATTACH_ADV', 'shop/adv');
define('ATTACH_ACTIVITY', 'shop/activity');
define('ATTACH_WATERMARK', 'shop/watermark');
define('ATTACH_POINTPROD', 'shop/pointprod');
define('ATTACH_GROUPBUY', 'shop/groupbuy');
define('ATTACH_SLIDE', 'shop/store/slide');
define('ATTACH_VOUCHER', 'shop/voucher');
define('ATTACH_REDPACKET', 'shop/redpacket');
define('ATTACH_STORE_JOININ', 'shop/store_joinin');
define('ATTACH_REC_POSITION', 'shop/rec_position');
define('ATTACH_CONTRACTICON', 'shop/contracticon');
define('ATTACH_CONTRACTPAY', 'shop/contractpay');
define('ATTACH_WAYBILL', 'shop/waybill');
define('ATTACH_MOBILE', 'mobile');
define('ATTACH_CIRCLE', 'circle');
define('ATTACH_CMS', 'cms');
define('ATTACH_LIVE', 'live');
define('ATTACH_MALBUM', 'shop/member');
define('ATTACH_MICROSHOP', 'microshop');
define('ATTACH_DELIVERY', 'delivery');
define('ATTACH_CHAIN', 'chain');
define('ATTACH_ADMIN_AVATAR', 'admin/avatar');
define('WX_ATTACH_ADMIN_AVATAR', 'admin/avatar');
define('TPL_SHOP_NAME', 'default');
define('TPL_SELLER_NAME', 'default');
define('TPL_CIRCLE_NAME', 'default');
define('TPL_MICROSHOP_NAME', 'default');
define('TPL_CMS_NAME', 'default');
define('TPL_ADMIN_NAME', 'default');
define('TPL_WX_ADMIN_NAME', 'default');
define('TPL_DELIVERY_NAME', 'default');
define('TPL_CHAIN_NAME', 'default');
define('TPL_MEMBER_NAME', 'default');
define('ADMIN_MODULES_SYSTEM', 'modules/system');
define('WX_ADMIN_MODULES_SYSTEM', 'modules/system');
define('ADMIN_MODULES_SHOP', 'modules/shop');
define('WX_ADMIN_MODULES_SHOP', 'modules/shop');
define('ADMIN_MODULES_CMS', 'modules/cms');
define('ADMIN_MODULES_CIECLE', 'modules/circle');
define('ADMIN_MODULES_MICEOSHOP', 'modules/microshop');
define('ADMIN_MODULES_MOBILE', 'modules/mobile');
/*
 * 商家入驻状态定义
 */
//新申请
define('STORE_JOIN_STATE_NEW', 10);
//完成付款
define('STORE_JOIN_STATE_PAY', 11);
//初审成功
define('STORE_JOIN_STATE_VERIFY_SUCCESS', 20);
//初审失败
define('STORE_JOIN_STATE_VERIFY_FAIL', 30);
//付款审核失败
define('STORE_JOIN_STATE_PAY_FAIL', 31);
//开店成功
define('STORE_JOIN_STATE_FINAL', 40);

//默认颜色规格id(前台显示图片的规格)
define('DEFAULT_SPEC_COLOR_ID', 1);
/**
 * 商品图片
 */
define('GOODS_IMAGES_WIDTH', '60,240,360,1280');
define('GOODS_IMAGES_HEIGHT', '60,240,360,12800');
define('GOODS_IMAGES_EXT', '_60,_240,_360,_1280');
/**
 *  订单状态
 */
//已取消
define('ORDER_STATE_CANCEL', 0);
//已产生但未支付
define('ORDER_STATE_NEW', 10);
//已支付
define('ORDER_STATE_PAY', 20);
//已发货
define('ORDER_STATE_SEND', 30);
//已收货，交易成功
define('ORDER_STATE_SUCCESS', 40);
//订单超过N小时未支付自动取消
define('ORDER_AUTO_CANCEL_TIME', 1);
//订单超过N天未收货自动收货
define('ORDER_AUTO_RECEIVE_DAY', 10);
//预订尾款支付期限(小时)
define('BOOK_AUTO_END_TIME', 72);
//门店支付订单支付提货期限(天)
define('CHAIN_ORDER_PAYPUT_DAY', 7);
/**
 * 订单删除状态
 */
//默认未删除
define('ORDER_DEL_STATE_DEFAULT', 0);
//已删除
define('ORDER_DEL_STATE_DELETE', 1);
//彻底删除
define('ORDER_DEL_STATE_DROP', 2);

/**
 * 文章显示位置状态,1默认网站前台,2买家,3卖家,4全站
 * @var unknown
 */
define('ARTICLE_POSIT_SHOP', 1);
define('ARTICLE_POSIT_BUYER', 2);
define('ARTICLE_POSIT_SELLER', 3);
define('ARTICLE_POSIT_ALL', 4);
//兑换码过期后可退款时间，15天
define('CODE_INVALID_REFUND', 15);
